<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.fick.hibernate.model.*"%>
<%@ page import="com.fick.hibernate.dao.*"%>
<%@ page import="com.fick.util.Pager" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- head -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>滑县公安信息网</title>
<link href="images/hxgaj.css" rel="stylesheet" type="text/css" />
</head>
<!-- head -->

<body>

<%@ include file="inc/head.jsp" %>

<!-- hxgaj -->

<table width="1003" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td align="left" valign="top"><table width="761" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="32" align="right" valign="middle" background="images/wzdh.gif"><table border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="745" height="25" align="left" valign="middle" class="dhwz_wz3">通讯录查询</td>
            </tr>
        </table></td>
      </tr>
    </table>
    <!-- add by fick -->
    <%
	Txlfick txl;
	List li2=(List)request.getAttribute("list");
	int totalCount=(Integer)request.getAttribute("totalCount");
	int currPage=(Integer)request.getAttribute("currPage");
	int totalPage=(Integer)request.getAttribute("totalPage");
	String QueryString="";
	if(request.getAttribute("queryString")!=null)
	{
		QueryString=QueryString+(String)request.getAttribute("queryString");
	}
	if(request.getAttribute("queryString2")!=null)
	{
		QueryString=QueryString+(String)request.getAttribute("queryString2");
	}
 %>

<table align="left" width="745"  height="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="100%" align="center" valign="top" background="images/main_bj.gif" bgcolor="#FBFCFD">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="23" align="right" valign="middle" background="images/main_top.gif">
        <table border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="745" height="10" align="right" valign="middle" background="${images}/wzdh.gif">
	    	&nbsp;
	    	</td>
          </tr>
        </table></td>
      </tr>
    </table>
      	<form name="queryform" action="/contactAction.do?method=findTxl" method="post">
			<script>
	 				function checkform()
	 				{
	 					queryform.submit();
	 				}
	 		</script>
			 <table width="98%"  border="0" align="center" cellpadding="0" cellspacing="1" >
			 <tr>
			 	<td align="left">
			 			按条件查询：<select name="property">
			 				<option value="">请选择</option>
			 				<option value="name">姓名</option>
			 				<option value="tel">内线</option>
			 				<option value="phone">手机</option>
			 				</select>
			 	</td>
			 	<td align="left"><input type="text" name="propertyValue"/></td>
			 	<td>&nbsp;</td>
			 	<td height="5" align="center">
			 	<%
			 		TxlDAO dao=new TxlDAO();
			 		List<String> unitList=dao.findBySql("SELECT distinct unit FROM admin where unit is not null"); 
			 	%>
			 		所属单位：<select name="unit">
			 				<option value="">请选择</option>
			 				<%
			 					for(int i = 0 ; i < unitList.size() ; i ++ ) {
			 					String unit = (String)unitList.get(i);
			 				%>
			 				<option value="<%=unit %>"><%=unit %></option>
			 				<%}%>
			 		</select>
			 	</td>
			 	<td>
			 	<select name="searchtype" >
			 	<option value="0">精确查询</option>
			 	<option value="1">模糊查询</option>
			 	</select>
			 	</td>
			 	<td><input type="button" value="查询" onclick="checkform()"></td>
			 </tr>
			 </table>
			 </form>
      <%
	   if(li2!=null)
	   { %>
      <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#FAB5AF">
        <tr>
		  <td width="15%" height="25" align="center" valign="middle" background="images/main_t_bj.gif" bgcolor="#FFFFFF" class="ts_lmdh">姓名</td>
          <td width="15%" height="25" align="center" valign="middle" background="images/main_t_bj.gif" bgcolor="#FFFFFF" class="ts_lmdh">内线</td>
          <td width="15%" height="25" align="center" valign="middle" background="images/main_t_bj.gif" bgcolor="#FFFFFF" class="ts_lmdh">手机</td>
          <td width="15%" height="25" align="center" valign="middle" background="images/main_t_bj.gif" bgcolor="#FFFFFF" class="ts_lmdh">所属单位</td>
          <td width="15%" height="25" align="center" valign="middle" background="images/main_t_bj.gif" bgcolor="#FFFFFF" class="ts_lmdh">备注</td>
          <td width="10%" height="25" align="center" valign="middle" background="images/main_t_bj.gif" bgcolor="#FFFFFF" class="ts_lmdh">序号</td>
        </tr>
       
	   <%
		for(int i = 0 ; i < li2.size(); i++){
			txl = (Txlfick)li2.get(i);
										      
	 %>
	    <tr>
		  <td width="15%" height="25" align="center" valign="middle" bgcolor="#FFFFFF" style="padding-left:7px">
		  <%=txl.getName()%>
		  </td>
		  <td width="15%" height="25" align="center" valign="middle" bgcolor="#FFFFFF" style="padding-left:7px">
		  <%=txl.getTel()%>
		  </td>
		  <td width="15%" height="25" align="center" valign="middle" bgcolor="#FFFFFF" style="padding-left:7px">
		  <%=txl.getPhone()%>
		  </td>
		  <td width="15%" height="25" align="center" valign="middle" bgcolor="#FFFFFF" style="padding-left:7px">
			<%=txl.getUnit() %>
		  </td>
		  <td width="15%" height="25" align="center" valign="middle" bgcolor="#FFFFFF" style="padding-left:7px">
		  <%=txl.getBz()%>
		  </td>
		   <td width="10%" height="25" align="center" valign="middle" bgcolor="#FFFFFF" style="padding-left:7px">
		  <%=txl.getOrderStr()==null?"":txl.getOrderStr()%>
		  </td>
		  
  		</tr>
      <%
	  }
	  %>	  
	  </table> 
	  <table width="98%" align="center" border="0" cellspacing="0" cellpadding="0">
	  <tr><td height="8"></td></tr>
		  	<tr><td align="center"><%=new Pager().nprintTable("/contactAction.do?method=findTxl&",currPage,totalPage,totalCount,QueryString,QueryString)%></td></tr>
	  </table>
	  <%	  
	  } %>
      </td>
  </tr>
</table>
    <!-- add by fick -->
    </td>
    <td width="235" align="center" valign="top">
    </td>
  </tr>
</table>
<!-- hxgaj -->   
<%@ include file="inc/foot.jsp" %>
</body>
</html>

